package com.ebt.m.commons.buscomponent.listview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

public abstract class IView extends LinearLayout {

    protected OnClickListner mOnclickListner;
    protected int mPosition;

    public IView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public IView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public IView(Context context) {
        super(context);
    }

    public abstract void update(Object... args);

    public IView getView() {
        return this;
    }

    public interface OnClickListner {
        void onClick(View view, Object... args);

        void onLongClick(View view, Object... args);
    }

    public void setOnClickViewListener(OnClickListner listener) {
        this.mOnclickListner = listener;
    }

    public void setPosition(int position) {
        this.mPosition = position;
    }

}
